FROM doctrine/python-java-others

COPY . /correction_service

WORKDIR /correction_service/app

RUN sudo pip3 install --upgrade pip && sudo pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -r ./requirements.txt

RUN sudo python install_hanlp.py

EXPOSE 8080

CMD sudo gunicorn -w8 -b 0.0.0.0:8080  --access-logfile ./log/correction_service.log --worker-connections 1000 -k 'gevent' -preload  app:app